<style type="text/css">
	.tree_box{
		position: relative;
		margin-top:5px;
		background: #fff;
		font-size: 12px;
		padding: 12px 0 36px 0;
	}
	.tree_footer{
		position: absolute;
		width: 100%;
		margin: 0 auto;
		bottom: 9px;
	}
	.tree_content{
		padding: 12px 0;
		height: 600px;
		overflow-y: auto;
		overflow-x: hidden;
		border: 1px solid #eee;
	}
	.op_header{
		margin-bottom: 12px;
		padding-left: 24px;
	}
	.search_box{
		vertical-align: middle;
		display: inline-block;
	}
</style>
<div id="content">
	<div class="row s_page_title" *ngIf="pageType ==='菜单'">
		<sa-big-breadcrumbs [items]="['系统基础管理','用户管理','用户菜单权限设置']" icon="fa fa-list" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="row s_page_title" *ngIf="pageType ==='车辆'">
		<sa-big-breadcrumbs [items]="['系统基础管理','用户管理','用户车辆权限设置']" icon="fa fa-list" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="page-header" style="background-color: #fff;padding: 12px;margin: 0;">
		<h1 class="page_detail_title">{{pageType}}权限设置-[{{userName}}]</h1>
	</div>
	<div class="row tree_box" style="margin-top: 0;">
		<div class="op_header">
			<button type="button" (click)='allOpen()' class="btn btn-primary">全部展开</button>
			<button type="button" (click)='allClose()' class="btn btn-primary">全部折叠</button><div class="top-search search_box">
				<input type="text" [(ngModel)]="searchKey" (change)="table_search()" class="search-input" placeholder="关键字...">
				<span class="top-search-box">
			        <button class="top-search-btn" type="button" (click)="table_search()"> <i class="fa fa-search"></i></button>
			    </span>
			</div>
		</div>
		<div class="col-xs-12" style="padding: 0;">
			<div *ngIf="companyCar.length > 0" style="font-weight: bold;font-size: 14px;position: absolute; left:24px;top: 12px;">{{pageType}}资源</div>
			<div class="form-group tree_content" id="tree_content">
		      	<div class="" style="margin-left: 100px;">
		         	<div id="tree"></div>
		         	<div *ngIf="isShow == true" style="margin-top: 80px;color: #999;">无数据，用户<span style="color: #333;font-size: 14px;">{{userName}}</span>所属角色{{pageType}}权限没有分配</div>
		      	</div>
		   	</div>
		</div>
		<div class="center tree_footer">
			<button type="button" (click)='saveDate("1")' class="btn btn-primary">保存[同步角色]</button>
			<button type="button" (click)='saveDate("0")' class="btn btn-primary">保存[权限独立]</button>
			<button type="button" (click)='goBack()' class="btn default">返回</button>
			<div class="note" style="display:inline-block;position:absolute;margin-top:0;margin-left:12px;text-align: left;">
				<p>同步角色：用户权限与角色同步；</p>
				<p>权限独立：用户权限只包含勾选项，不与角色同步;</p>
			</div>
		</div>
	</div>
</div>